Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Give the configuration context precedence over context in integrations #688

Merged
merged 5 commits into from
Aug 25, 2021

Conversation

imjoehaines
Copy link
Contributor

Goal

If Configuration#context is set then it will now take precedence over the context set by integrations. This is true even if it is set to nil, in which case no context will be sent by the notifier — the context will be set by the Bugsnag app instead

For example:

image

The top error has config.context = nil, so the context is set by the Bugsnag app
The middle error has config.context = 'some context' and so always uses that value as the context
The bottom error has no context set in config, which allows the Rack integration's context to be used

Copy link
Contributor

@kattrali kattrali left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a nice solution to a hairy problem!

@imjoehaines imjoehaines merged commit 50759dd into next Aug 25, 2021
@imjoehaines imjoehaines deleted the configuration-context-precedence branch August 25, 2021 16:31
@imjoehaines imjoehaines mentioned this pull request Sep 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants